
// 节流防止暴力破解
export const throttle = (fn, delay) => {
    window._nowTime = +new Date()

    if (window._lastTime - window._nowTime < delay || !window._lastTime) {
        fn()
        window._nowTime = window._lastTime
    }
}